/*package bl.commodity;

import java.rmi.RemoteException;

import o.Authority;
import o.UserType;
import vo.CommodityVo;
import vo.UserVo;
import blservice.commodity.StockBLService;
import db.commodity.CommodityDBStub;
import dbservice.commodity.CommodityDBService;

public class StockBLDriver {
	StockBLService bl;
	CommodityDBService db;
	public static void main(String[] args) {
		UserVo user=new UserVo();
		user.setName("小华");
		user.setAuthority(Authority.普通权限);
		user.setPassword("abc");
		user.setOperator("test");
		user.setUserType(UserType.库存管理人员);
		user.setOperation("商品管理");
		StockBLDriver d=new StockBLDriver();
		try {
			d.drive(user);
		} catch (RemoteException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

	}
    void drive(UserVo user) throws RemoteException{
		bl=new StockBLStub();
		db=new CommodityDBStub();
	
		CommodityVo vo=new CommodityVo();
		vo.setOperation("商品管理");
		vo.setOperator("test");
		vo.setBelongTo("日光灯");
//		vo.set编号("000001");
		vo.setName("飞利浦日光灯");
		vo.set型号("SR01");
		vo.setstocknum(0);
		vo.set进价(25);
		vo.set售价(35);
		vo.set最近进价(30);
		vo.set最近售价(40);
		vo.set库存数量警戒值(30);
		
		System.out.println("show:");
		CommodityVo commodity;
		CommodityVo result = new CommodityVo();
		CommodityVo[] r=bl.show(vo,vo);
		for(int i=0;i<r.length;i++){
			commodity=r[i];
			if(result.isSuccessed()){
				System.out.println("commodity的信息:");
				System.out.println(commodity.getBelongTo());
//				System.out.println(commodity.get编号());
				System.out.println(commodity.getName());
				System.out.println(commodity.get型号());
				System.out.println(commodity.getstocknum());
				System.out.println(commodity.get进价());
				System.out.println(commodity.get售价());
				System.out.println(commodity.get最近进价());
				System.out.println(commodity.get最近售价());
				System.out.println(commodity.get库存数量警戒值());
			}else{
				System.out.println(commodity.getFailMessage());
			}
		}
		
		System.out.println("check:");
		result=bl.check();
		if(result.isSuccessed()){
			System.out.println("盘点成功");
		}else{
			System.out.println(result.getFailMessage());
		}
		
		System.out.println("export:");
		result=bl.export();
		if(result.isSuccessed()){
			System.out.println("导出成功");
		}else{
			System.out.println(result.getFailMessage());
		}
	
    }
}
*/